<include file="Public/header"/>

<div class="x-nav">
      <span class="layui-breadcrumb">

      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ&#xe615;</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" method="post">
          
	      <input class="layui-input" placeholder="开始日" value="{:I('start')}" name="start" id="start">
	      <input class="layui-input" placeholder="截止日"  value="{:I('end')}" name="end" id="end">
          <input type="text" name="uid"  value="{:I('uid')}" placeholder="请输入团长uid" autocomplete="off" class="layui-input">
		  <input type="text" name="goodsid"  value="{:I('goodsid')}" placeholder="请输入商品id" autocomplete="off" class="layui-input">
		  <input type="text" name="tags"  value="{:I('tags')}" placeholder="请输入标签" autocomplete="off" class="layui-input">
          <div class="layui-input-inline">
            <select name="status">
              <option value="0" <php>if(I("status")==0) echo 'selected' </php>>状态选择</option>
              <option value="1" <php>if(I('status') == 1) echo 'selected'</php>>待审核</option>
              <option value="2" <php>if(I('status') == 2) echo 'selected'</php>>已通过</option>
              <option value="3" <php>if(I('status') == 3) echo 'selected'</php>>未通过</option>
              
            </select>
          </div>		  
          <button class="layui-btn" id="search"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>

        </form>
      </div>
      <xblock>
        <button class="layui-btn layui-bg-red" onclick="delAll('','{:U('del')}')"><i class="layui-icon"></i>永久删除</button>
        <button class="layui-btn layui-bg-green" onclick="issetAll('','{:U('isagree')}')">批量审核通过</button>
        <button class="layui-btn layui-bg-blue" onclick="issetAll('','{:U('isnotagree')}')">批量审核未通过</button>
        <span class="x-right" style="line-height:40px">共有数据：{$count} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
		    <th>
		        <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
		    </th>
            <th>ID</th>
            <th>会员信息</th>
            <th>订单号</th>
            <th>商品名称</th>
            <th>图片</th>
            <th>评论内容</th>
            <th>评论时间</th>
            <th>标签</th>
            <th>状态</th>
          </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
          <tr>
            <td>
            	<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo['id']}'><i class="layui-icon">&#xe605;</i></div>
			</td>
            <td>{$vo['id']}</td>
            <td><img src="{$vo['acv']}"  width=40 height=40>{$vo['name']}|{$vo["mobile"]}</td>
            <td>{$vo['out_trade_no']}</td>
            <td>{$vo['goodsname']}</td>
            <td>
            	<foreach name="vo['imgs']" item='v'>
            	<img src="{$v}" width=40 height=40 borlder=0>&nbsp;&nbsp;
            	</foreach>
            </td>
            <td>{$vo['content']}</td>
            <td>{$vo["tags"]}</td>

            <td>{$vo['addtime']|date='Y-m-d H:i:s',###}</td>
             <td>
            	<switch name="vo['status']">
            		<case value='1'>未审核</case>
            		<case value='2'><font color='green'>已通过</font></case>
            		<case value='3'><font color='red'>未通过</font></case>
            	</switch>
            </td>           
          </tr>
        </volist>


        </tbody>
      </table>
      <div class="page" id="page">
        {$page}
      </div>

    </div>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
    
    function issetAll(argument,url){
	    var data = tableCheck.getData();
	    
	    layer.confirm('确认要这样操作吗？',function(index){

	        if(data == false || data=='undefined'){
	            layer.msg('参数错误',{icon:5});
	            return false;
	        }
	        $.post(url,{id:data},function (res) {
	            if(res.code){
	                layer.msg(res.msg,{icon:5});
	            }else{

	                layer.msg('操作成功', {icon: 1});
	                location.replace(location.href);
	            }

	        })

	    });
    }

    </script>

<include file="Public/footer"/>

